<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台管理系统</title>
    <link rel="icon" href="/img/logo.png" type="image/x-icon"/>
    <link rel="stylesheet" href="/layui/css/layui.css">
    <script src="/script/jquery-3.3.1.min.js"></script>
    <script src="/layui/layui.js"></script>
    <script src="/script/admin/project/advert_desc_edit.js"></script>
</head>
<body>
<input type="hidden" id="id" th:value="${advert.id}">
    <form class="layui-form" id="form">


        <div class="layui-form-item">
            <label class="layui-form-label">广告图片</label>
            <div class="layui-input-block layui-col-md5">
                <button type="button" class="layui-btn" id="update_cover_btn">上传图片</button>
                <input type="hidden" id="url" name="url" lay-verify="url" th:value="${advert.url}">
                <div class="layui-upload-list">
                    <img class="layui-upload-img" id="demo1" th:src="${advert.url}">
                    <p id="demoText"></p>
                </div>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">截止时间</label>
            <div class="layui-input-block layui-col-md7">
                <input type="text" class="layui-input" id="endTime" lay-verify="required" th:value="${advert.showEndTime}"> </div>
        </div>


        <div class="layui-form-item">
            <label class="layui-form-label">是否启用</label>
            <div class="layui-input-block layui-col-md5">
                <select name="used"  id="used" >
                    <option value="1" th:selected="${advert.used == '1'}">是</option>
                    <option value="0" th:selected="${advert.used == '0'}">否</option>
                </select>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">跳转链接</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="link" id="link" autocomplete="off" th:value="${advert.link}"  placeholder="请输入跳转链接"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">描述</label>
            <div class="layui-input-block layui-col-md5">
                <input type="text" name="desc" id="desc" autocomplete="off" th:value="${advert.desc}" placeholder="请输入描述"  class="layui-input">
            </div>
        </div>

        <div class="layui-form-item layui-col-md-offset1" style="margin-bottom: 25px;">
            <div class="layui-btn" id="submit" lay-filter="form" lay-submit>提交</div>
        </div>


    </form>
</body>
</html>